home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
commercial
/
legendary_design
/
addressit!
/
reqbase.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-11-17
|
13KB
|
354 lines
/* reqlibrary.h © 1988/1989 reserved by Colin Fox and Bruce Dawson */
#ifndef REQLIBRARY_H
#define REQLIBRARY_H
#define REQVERSION 1
#define NUMPAIRS 10
struct GadgetBlock
{
struct Gadget Gadget;
struct Border Border;
WORD Pairs[NUMPAIRS];
struct IntuiText Text;
};
struct StringBlock
{
struct Gadget Gadget;
struct StringInfo Info;
struct Border Border;
WORD Pairs[NUMPAIRS];
};
struct PropBlock
{
struct Gadget Gadget;
struct PropInfo Info;
struct Image Image;
};
struct ScrollBlock
{
struct Gadget ArrowUpLt;
struct Image ImageUpLt;
struct Gadget ArrowDnRt;
struct Image ImageDnRt;
struct PropBlock Prop;
};
struct TwoImageGadget
{
struct Gadget Gadget;
struct Image Image1;
struct Image Image2;
};
#define ATTITUDEB 16
#define HORIZSLIDER (0L<<ATTITUDEB) /*;which way the slider stands*/
#define VERTSLIDER (1L<<ATTITUDEB) /*;This is so that it bypasses all gadget flags.*/
/*; This structure is use with the TextRequester function.*/
struct TRStructure
{
char *Text; /* ;This is the message text, including printf() style formatting if desired.*/
char *Controls; /* ;This is the address of the parameter list, if printf() style formatting is used.*/
struct Window *Window;/* ;This is an optional (zero if not used) pointer to a window on the screen you*/
/* ;would like the requester to show up on.*/
char *MiddleText; /* ;If non-zero, this is the text for the gadget in the lower middle (returns 2).*/
char *PositiveText; /* ;If non-zero, this is the text for the gadget in the lower left hand corner (returns 1).*/
char *NegativeText; /* ;If non-zero, this is the text for the gadget in the lower right (returns 0).*/
char *Title; /* ;This is the title for the window.*/
WORD KeyMask; /* ;This is the qualifier mask for the keyboard shortcuts.*/
/* ;Use $FFFF to allow any qualifiers (or none).*/
/* ;Zero means that no keyboard shortcuts are allowed.*/
WORD textcolor; /* ;Color of the text. Uses color 1 if no color specified. */
WORD detailcolor; /* ;Detail and block color, as in a NewWindow structure. If */
WORD blockcolor; /* ;both are left zero, block pen will be set to 1. */
WORD versionnumber; /* ;Make SURE this is set to zero. */
LONG rfu1; /* ;Make SURE you leave these two zeroed also. */
LONG rfu2; /* ;Make SURE you leave these two zeroed also. */
};
/* NOTE:
The control values mentioned above are used if you choose to insert
printf style directives in your strings and should contain the address of
a list of control parameters, usually on the stack.
*/
/*; Remember, if you don't want to go through the hassle of */
/*; initializing a ExtendedColorRequester structure, you can always just call */
/*; ColorRequester (as opposed to ExtendedColorRequester). ColorRequester */
/*; just takes a single parameter, in D0, the color that should start out */
/*; being highlit. It returns a single value, the color that was selected at */
/*; the end.
/*; This structure is for use with the ExtendedColorRequester (_not_, */
/*; the ColorRequester) function. */
struct ExtendedColorRequester
{
LONG defcolor; /*;The color that is initially highlit. */
APTR window; /*;The window the 'requester' opens up in. */
LONG rfu1; /*;Who knows what these will be used for, */
LONG rfu2; /*;but I'm sure we'll think of something. */
LONG rfu3; /*;Until then, just keep these zeroed. */
LONG rfu4; /*;Okay? */
LONG rfu5;
};
/*; This structure is for use with the GetLong function.*/
#define GLNODEFAULTB 0 /*;Set this bit in the flags if you don't want a default*/
/*;value to show up in the get long string gadget. For*/
/*;some things this is much better than having a zero*/
/*;show up.*/
#define GLNODEFAULTM (1<<GLNODEFAULTB)
struct GetLongStruct
{
char *titlebar;
LONG defaultval;
LONG minlimit;
LONG maxlimit;
LONG result;
struct Window *window;
WORD versionnumber; /* ;Make SURE this is set to zero. */
LONG flags; /* Some, uh flags. See above for bit definitions. */
LONG rfu2; /* ;Make SURE you leave these two zeroed also. */
};
struct GetStringStruct
{
char *titlebar;
char *stringbuffer;
struct Window *window;
WORD stringsize; /* how many characters in the buffer */
WORD visiblesize; /* how many characters show on screen */
WORD versionnumber;
LONG flags;
LONG rfu1;
LONG rfu2;
LONG rfu3;
};
#ifndef DSIZE
#define DSIZE 130
#define FCHARS 30
#endif
#define WILDLENGTH 30
#define FRQSHOWINFOB 0 /*;Set this in Flags if you want .info files to show. They default to hidden.*/
#define FRQEXTSELECTB 1 /*;Set this in Flags if you want extended select. Default is not.*/
#define FRQCACHINGB 2 /*;Set this in Flags if you want directory caching. Default is not.*/
#define FRQGETFONTSB 3 /*;Set this in Flags if you want a font requester rather than a file requester.*/
#define FRQINFOGADGETB 4 /*;Set this in Flags if you want a hide-info files gadget.*/
#define FRQHIDEWILDSB 5 /*;Set this in Flags if you DON'T want 'show' and 'hide' string gadgets.*/
#define FRQABSOLUTEXYB 6 /*;Use absolute x,y positions rather than centering on mouse.*/
#define FRQCACHEPURGEB 7 /*;Purge the cache whenever the directory date stamp changes if this is set.*/
#define FRQNOHALFCACHEB 8 /*;Don't cache a directory unless it is completely read in when this is set.*/
#define FRQNOSORTB 9 /*;Set this in Flags if you DON'T want sorted directories.*/
#define FRQNODRAGB 10 /*;Set this in Flags if you DON'T want a drag bar and depth gadgets.*/
#define FRQSAVINGB 11 /*;Set this bit if you are selecting a file to save to.*/
#define FRQLOADINGB 12 /*;Set this bit if you are selecting a file(s) to load from.*/
/*;These two bits (save and load) aren't currently used for*/
/*;anything, but they may be in the future, so you should*/
/*;remember to set them. Also, these bits make it easier if*/
/*;somebody wants to customize the file requester for their*/
/*;machine. They can make it behave differently for loading*/
/*;vs saving.*/
#define FRQDIRONLYB 13 /*;Allow the user to select a directory, rather than a file.*/
#define FRQSHOWINFOM (1<<FRQSHOWINFOB)
#define FRQEXTSELECTM (1<<FRQEXTSELECTB)
#define FRQCACHINGM (1<<FRQCACHINGB)
#define FRQGETFONTSM (1<<FRQGETFONTSB)
#define FRQINFOGADGETM (1<<FRQINFOGADGETB)
#define FRQHIDEWILDSM (1<<FRQHIDEWILDSB)
#define FRQABSOLUTEXYM (1<<FRQABSOLUTEXYB)
#define FRQCACHEPURGEM (1<<FRQCACHEPURGEB)
#define FRQNOHALFCACHEM (1<<FRQNOHALFCACHEB)
#define FRQNOSORTM (1<<FRQNOSORTB)
#define FRQNODRAGM (1<<FRQNODRAGB)
#define FRQSAVINGM (1<<FRQSAVINGB)
#define FRQLOADINGM (1<<FRQLOADINGB)
#define FRQDIRONLYM (1<<FRQDIRONLYB)
struct ESStructure
{
struct ESStructure *NextFile;
WORD NameLength; /* Length of thefilename field, not including the terminating zero. */
WORD Pad;
APTR Node; /* For internal use only. */
char thefilename[1]; /* This is a variable size field. */
};
struct FileRequester
{
UWORD VersionNumber; /* Make sure this is zeroed for now. */
char *Title; /* Hailing text */
char *Dir; /* Directory array (DSIZE+1) */
char *File; /* Filename array (FCHARS+1) */
char *PathName; /* Complete path name array (DSIZE+FCHARS+2) */
struct Window *Window; /* Window requesting or NULL */
UWORD MaxExtendedSelect; /* Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.*/
UWORD numlines; /* Number of lines in file window. */
UWORD numcolumns; /* Number of columns in file window. */
UWORD devcolumns;
ULONG Flags; /* Various - umm - flags. See above for more info. */
UWORD dirnamescolor; /* These five colors will all default */
UWORD filenamescolor; /* to color one if you don't specify */
UWORD devicenamescolor; /* a color (ie; if you specify color zero). */
UWORD fontnamescolor; /* If you want color zero to be used, specify */
UWORD fontsizescolor; /* color 32, or some other too large number */
/* which mods down to zero. */
UWORD detailcolor; /* If both of these colors are specified a